package com.cloud.salon.client.business.controller;

import com.cloud.salon.client.business.service.impl.ReportServiceImpl;
import com.cloud.salon.common.base.response.Res;
import com.cloud.salon.common.base.vo.highcharts.ParameterVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 报表数据控制器
 * @Author wolf--LZH
 * @CreateDate 2019/5/15 0015 下午 8:18
 */
@RestController
@RequestMapping("report")
@Api(tags = "报表图表数据获取相关接口")
public class ReportController {

    @Autowired
    private ReportServiceImpl service;

    @PostMapping("accountConsumeProportion")
    @ApiOperation(value="会员与非会员消费比例")
    public Res accountConsumeProportion(@RequestBody ParameterVO parameterVO) {
        return service.accountConsumeProportion(parameterVO);
    }

    @PostMapping("accountregistrationTrend")
    @ApiOperation(value="会员注册数趋势")
    public Res accountregistrationTrend(@RequestBody ParameterVO parameterVO) {
        return service.accountregistrationTrend(parameterVO);
    }

    @PostMapping("consumeTrend")
    @ApiOperation(value="消费趋势")
    public Res consumeTrend(@RequestBody ParameterVO parameterVO) {
        return service.consumeTrend(parameterVO);
    }

    @PostMapping("itemConsumeTrend")
    @ApiOperation(value="消费趋势")
    public Res itemConsumeTrend(@RequestBody ParameterVO parameterVO) {
        return service.itemConsumeTrend(parameterVO);
    }

}
